package com.cskaoyan.service;

import com.cskaoyan.mapper.MarketAdMapper;
import com.cskaoyan.model.MarketAd;
import com.cskaoyan.model.MarketAdExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description
 * @Author zoe ling
 * @Date 2024/6/8
 */
@Service
public class AdserviceImpl implements Adservice {
    @Autowired
    MarketAdMapper adMapper;
    @Override
    public List<MarketAd> query() {
        MarketAdExample example = new MarketAdExample();
        example.createCriteria().andDeletedEqualTo(false);
        example.setOrderByClause("add_time desc");
        List<MarketAd> marketAds = adMapper.selectByExample(example);
        return marketAds;
    }
}
